/**
 * 
 */
package jmine.tec.report;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Interface para rows executaveis.
 * 
 * @author takeshi
 * @version 22/08/2007
 */
public interface ExecutableDataRow extends DataRow {

    /**
     * Devolve o objeto associado ao ExecutableDataRow
     * 
     * @return Object
     */
    Object getRelatedObject();

    /**
     * FIXME Quando este m�todo deve deixar de existir? (julien) Double-Dispatch. A DataColumn vai chamar este m�todo no DataRow e o DataRow
     * deve saber qual m�todo de execucao do DataColumn � apropriado.
     * 
     * @param column DataColumn
     * @param params optional parameters
     */
    void execute(ExecutableDataColumn column, Map<String, Object> params);

    /**
     * Gets the executable rows
     * 
     * @return {@link List}
     */
    List<ExecutableDataRow> getExecutableDataRows();

    /**
     * Gets the executable row on the given index
     * 
     * @param index int
     * @return {@link ExecutableDataRow}
     */
    ExecutableDataRow getExecutableDataRow(final int index);

    /**
     * Adds a data cell to the end of this row's cells.
     * 
     * @param value double
     */
    void addDoubleDataCell(final double value);

    /**
     * Adds a data cell to the end of this row's cells.
     * 
     * @param value {@link Date}
     */
    void addDateDataCell(final Date value);

    /**
     * Adds a data cell to the end of this row's cells.
     * 
     * @param value {@link String}
     */
    void addStringDataCell(final String value);

    /**
     * Adds a data cell to the end of this row's cells.
     * 
     * @param value double
     */
    void addPercentageDataCell(final double value);

    /**
     * Adds a data cell to the end of this row's cells.
     * 
     * @param value double
     */
    void addCurrencyDataCell(final double value);

}
